1. Field of the Invention
The present invention generally relates to logical path establishing method and storage mediums, and more particularly to a logical path establishing method for establishing a logical path in a peer-to-peer connection and to a computer-readable storage medium which stores a program for causing a computer to establish a logical path by such a logical path establishing method.
2. Description of the Related Art
A peer-to-peer remote copy (hereinafter simply referred to as a PPRC) function is a synchronous copy function which prepares a standby secondary system (hereinafter simply referred to as a secondary system) separately from a working primary system (hereinafter simply referred to as a primary system), connects the primary system and the secondary system by an ESCON interface, and maintains data equivalence between the primary system and the secondary system. When the data equivalence is maintained between the primary system and the secondary system by copying the data written to the primary system to the secondary system in synchronism with the writing of the data to the primary system, it becomes possible to quickly and positively recover the data from the secondary system even when the primary system fails due to an accident such as a fire, without a large time delay in restoring lost data.
A file control units (FCUs) which form the primary system and the secondary system are constructed as shown in FIG. 1, for example. A primary FCU 1 is coupled to a host unit 3-1, and a secondary FCU 2 is coupled to a host unit 3-2. Each of the primary and secondary FCUs 1 and 2 includes a channel adapter (CA) 11, a centralized module (CM) 12, and a plurality of peer remote adapters (PRAs) 13. The CA 11 is provided to carry out an external interface control with respect to a channel (CH) 4 of the corresponding one of the host units 3-1 and 3-2. The CM 12 is provided to manage resources and the like within the corresponding one of the FCUs 1 and 2 to which this CM 12 belongs. The PRA 13 is provided to carry out an interface control with respect to an ESCON interface (ESCON I/F) 15. The switching of a path between the PRA 13 within the FCU1 and the PRA 13 within the FCU 2 is carried out by an ESCON director 16.
An information transfer via the ESCON I/F 15 is carried out in units of frames. The frames have variable lengths, but header portions of the frames have a common format, as shown in FIG. 2. As may be seen from FIG. 2, the frame includes a link header, an information field, and a link trailer. The link header includes an transmitting device address, a receiving device address, and a link control field (LCF), and is provided to specify the other party with respect to the switch.
The frames can be categorized into a link control frame which controls the link, and a device frame which controls input and/or output (I/O) processes between the frames. The LCF included in the link header indicates whether the frame is the link control frame or the device frame. In addition, the LCF also includes the details of the control as shown in FIG. 3, by a link-level-control function. In FIG. 3, an establish logical path (ELP) requests a logical path to be established, a logical path established (LPE) indicates successful establishment of the logical path, request node ID (RID) requests a node ID, and an ID response (IDR) notifies validity of the ID peculiar to the node with respect to the RID.
The link of the ESCON I/F 15 enables the I/O processes by establishing the logical path after establishing the physical path.
When transferring data to the secondary FCU 2 by the PPRC function, a logical path must be established between the peer-to-peer. In the following description, the logical path which is used by the PPRC function will be referred to as a PPRC path. This PPRC path is established by a command of the host unit 3-1. This command includes parameters such as an identifier of the primary FCU 1 and an identifier of the secondary FCU 2 which specify which parts between the primary FCU 1 and the secondary FCU 2 are to be logically connected, position information of the PRA 13 within the primary FCU 1, and position information of the FRA 13 within the secondary FCU 2.
In order to establish the PPRC path, a sequence which will be described with reference to FIG. 4 is carried out between the primary FCU 1 and the secondary FCU 2 after the physical path is established on the ESCON I/F 15. In FIG. 4, those parts which are the same as those corresponding parts in FIG. 1 are designated by the same reference numerals, and a description thereof will be omitted.
In a step s1) shown in FIG. 4, the CA 11 within the primary FCU 1 receives a PPRC path set command from the host unit 3-1. In a step s2), the CA 11 within the primary FCU 1 notifies the acceptance of the PPRC path set command to the CM 12 within the primary FCU 1. In a step s3), the CM 12 within the primary FCU 1 allocates the corresponding PRA 13 within the primary FCU 1, and makes a PPRC path set request with respect to this PRA 13. In a step s4), the PRA 13 within the primary FCU 1 transfers the ELP to the PRA 13 within the secondary FCU 2 by the LCF, and makes a logical path establish request.
In a step s5), the PRA 13 within the secondary FCU 2 recognizes that the logical path is established. However, at this point in time, there is no recognition that the established logical path is a PPRC path. In a step s6), the PRA 13 within the secondary FCU 2 transfers the LPE to the PRA 13 within the primary FCU 1 by the LCF, and notifies the successful establishment of the logical path. In a step s7), the PRA 13 within the primary FCU 1 transfers the RID to the PRA 13 within the secondary FCU 2 by the LCF, and requests an information notification of the secondary FCU 2.
In a step s8), the PRA 13 within the secondary FCU 2 transfers the IDR to the PRA 13 within the primary FCU 1 by the LCF, and notifies the information of the secondary FCU 2 stored within the secondary FCU 2. In a step s9), the PRA 13 within the primary FCU 1 checks whether or not the information of the secondary FCU 2 received from the PRA 13 within the secondary FCU 2 matches the requested information of the secondary FCU 2, and creates PPRC path set information if the information of the secondary FCU 2 match. In a step s10), the PRA 13 within the secondary FCU 2 transfer the RID to the PRA 13 within the primary FCU 1 by the LCF, and requests an information notification of the primary FCU 1. In a step s11), the PRA 13 within the primary FCU 1 transfers the IDR to the PRA 13 within the secondary FCU 2 by the LCF, and notifies the information of the primary FCU 1 stored within the primary FCU 1. In a step s12), the PRA 13 within the secondary FCU 2 recognizes that the set logical path is the PPRC path, based on the information of the primary FCU 1 received from the PRA 13 of the primary FCU 1.